#include "EPSG/Switch.h"

EPSG::Switch::Switch()
{
	_activeNode = NULL;
}

void EPSG::Switch::render()
{
	if( _activeNode == NULL )
		return;

	_activeNode->render();
}

void EPSG::Switch::setActive( int index )
{
	_activeNode = Group::getChild( index );
}

void EPSG::Switch::setActive( EPSG::Node* n )
{
	if( Group::hasChild( n ) )
		_activeNode = n;
	else
		_activeNode = NULL;
}

bool EPSG::Switch::addChild( Node* n )
{
	return Group::addChild( n );
}